package client;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JButton;
import java.awt.Font;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.JLabel;


public class BankAccountGUI extends JFrame {

	private JPanel contentPane;

	/**
	 * Launch the application.
	 */
	
	Person ps = new Person();
	int pID = ps.getPID();
	
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					BankAccountGUI frame = new BankAccountGUI();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public BankAccountGUI() {
		setTitle("\u8D26\u6237\u7BA1\u7406");
		setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
		setBounds(100, 100, 450, 300);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		JLabel label = new JLabel("\u8BF7\u9009\u62E9\u8D26\u6237\u7C7B\u578B\uFF1A");
		label.setFont(new Font("微软雅黑", Font.PLAIN, 17));
		label.setBounds(42, 31, 143, 23);
		contentPane.add(label);
		
		JButton button_1 = new JButton("\u8D37\u6B3E\u8D26\u6237");
		button_1.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				BkLoanAccountGUI frame = new BkLoanAccountGUI();
				frame.setLocationRelativeTo(null);
				frame.setVisible(true);
				BankAccountGUI.this.dispose();
			}
		});
		button_1.setFont(new Font("微软雅黑", Font.PLAIN, 15));
		button_1.setBounds(177, 177, 208, 41);
		contentPane.add(button_1);
		
		JButton button = new JButton("\u5B9A\u671F\u8D26\u6237");
		button.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				BkFixedAccountGUI frame = new BkFixedAccountGUI();
				frame.setLocationRelativeTo(null);
				frame.setVisible(true);
				dispose();
			}
		});
		button.setFont(new Font("微软雅黑", Font.PLAIN, 15));
		button.setBounds(113, 126, 208, 41);
		contentPane.add(button);
		
		JButton button_2 = new JButton("\u6D3B\u671F\u8D26\u6237");
		button_2.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				dispose();
				BkCurrentAccountGUI frame = new BkCurrentAccountGUI();
				frame.setLocationRelativeTo(null);
				frame.setVisible(true);
			}
		});
		button_2.setFont(new Font("微软雅黑", Font.PLAIN, 15));
		button_2.setBounds(55, 75, 208, 41);
		contentPane.add(button_2);
		
		JButton button_3 = new JButton("注销");
		button_3.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				BkUserLoginGUI frame = new BkUserLoginGUI();
				frame.setLocationRelativeTo(null);
				frame.setVisible(true);
				dispose();
			}
		});
		button_3.setFont(new Font("微软雅黑", Font.PLAIN, 13));
		button_3.setBounds(341, 10, 83, 22);
		contentPane.add(button_3);
	}

}
